package com.mysoft.gfyx.clue.backgroundjob;
import com.mysoft.gfyx.clue.service.CustomerService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class CustomerTimingJobHandler {

    @Resource
    private CustomerService customerService;
    @XxlJob(value="CustomerTimingJobHandler", init = "init", destroy = "destroy")
    public void execute() {
        //刷新联系人数量
        customerService.flushContacterCount();
        System.out.println("CustomerTimingJobHandler-execute");
    }

    public void init() {
        System.out.println("CustomerTimingJobHandler-初始化init！");
    }

    public void destroy() {
        System.out.println("CustomerTimingJobHandler-destroy……");
    }
}
